<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<jsp:include page="template_header.jsp" />

            <div class="span9"> <!-- /write your content -->
                <div class="page-header">
                    <h3>Transaction History</h3>
                </div>    
                <table class="table table-striped">
					<c:choose>
					<c:when test="${ (empty transactionList) }">
						<h3>No transaction history to display</h3>
					</c:when>
					<c:otherwise>
					<thead>
                	<tr>
						<th style = "text-align:center;">Fund Name</th>
						<th style = "text-align:center;">Operation</th>
						<th style = "text-align:center;">Number of Shares</th>
						<th style = "text-align:center;">Share Price</th>
						<th style = "text-align:center;">Amount</th>
						<th style = "text-align:center;">Order Date</th>
						<th style = "text-align:center;">Transaction Date</th>
						<th style = "text-align:center;">Status</th>
					</tr>
					</thead>
					<c:forEach var="transaction" items="${transactionList}">
						<tr>
							<td style = "text-align:left;">${transaction.fundName}</td>
							<td style = "text-align:center;">${transaction.operation}</td>
							<td style = "text-align:right;">${transaction.numberOfShares}</td>
							<td style = "text-align:right;">${transaction.sharePrice}</td>
							<td style = "text-align:right;">${transaction.amount}</td>
							<td style = "text-align:center;">${transaction.orderDate}</td>
							<td style = "text-align:center;">${transaction.transactionDate}</td>
							<td style = "text-align:center;">${transaction.status}</td>
					</c:forEach>
					</c:otherwise>
					</c:choose>
                </table>
            </div> <!-- /end your content-->
            
		<jsp:include page="template_tail.jsp" />